
<style type="text/css">
body {
	font-family:verdana,arial,sans-serif;
	font-size:10pt;
	margin:30px;
	background-color:#ffcc00;
	}
</style>
</head>


<a href ="addcustomer.php" target = "_top">Add another Customer</a><br />

<?php

$username="bsc353_4";
$password="sonbeans";
$database="bsc353_4";

$ID=$_POST['ID'];
$name=$_POST['customerName'];
$address=$_POST['address'];
$city=$_POST['city'];
$province=$_POST['province'];
$postalCode=$_POST['postalCode'];
$phoneNumber=$_POST['phoneNumber'];
		
if ($ID == '' ||$name == '')
alert("Not all required field are filled");
else
{
    mysql_connect("clipper.encs.concordia.ca",$username,$password);

    @mysql_select_db($database) or die ("Unable to select database");



    $query="INSERT INTO Customer VALUES ('$ID', '$name', '$address', '$city', '$province', '$postalCode', '$phoneNumber', 0)";
    mysql_query($query) or die ("failed to add record");



    //VALUES
    //('$_POST[ID]','$_POST[storeBranchID]')";

    echo "1 record added";
    //mysql_query($query) or die ("failed to add record");
}
mysql_close();
?> 

